Skip to content

feat: support Azure OpenAI v1 - #355

Merged
jbeckwith-oai merged 1 commit into
mainfrom
codex/azure-openai-v1
Aug 10, 2026
Merged

feat: support Azure OpenAI v1#355
jbeckwith-oai merged 1 commit into
mainfrom
codex/azure-openai-v1

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

  • add a first-class OpenAI::Providers.azure configuration for the Azure OpenAI v1 API
  • support Azure API keys and refreshable Microsoft Entra bearer-token providers, including per-retry refresh
  • normalize Azure resource endpoints to /openai/v1 and prevent credentials from crossing origins or conflicting with custom auth headers
  • add RBI/RBS declarations, focused provider tests, dedicated Azure documentation, and migrate the existing Azure example from preview configuration to v1

Validation

  • mise exec ruby@4.0.6 -- ./scripts/test (535 runs, 1,795 assertions)
  • mise exec ruby@4.0.6 -- bundle exec rake lint
  • mise exec ruby@4.0.6 -- bundle exec rake build:gem
  • focused Azure provider tests (11 runs, 84 assertions)
  • Bedrock provider regression tests (23 runs, 153 assertions)

Scope

This targets the GA Azure OpenAI v1 API. It does not inject dated api-version parameters or rewrite paths for legacy deployment-scoped APIs.

@jbeckwith-oai
jbeckwith-oai marked this pull request as ready for review August 10, 2026 19:23
@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner August 10, 2026 19:23
@openai-sdks

openai-sdks Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 8.621s for Ruby SDK PR #355.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 144ms
tests/chat-completions-create.test.ts ✅ Passed 263ms
tests/chat-completions-stream.test.ts ✅ Passed 136ms
tests/files-content-binary.test.ts ✅ Passed 301ms
tests/files-create-multipart.test.ts ✅ Passed 243ms
tests/files-list-pagination.test.ts ✅ Passed 183ms
tests/initialize-config.test.ts ✅ Passed 184ms
tests/instance-isolation.test.ts ✅ Passed 259ms
tests/models-list.test.ts ✅ Passed 166ms
tests/responses-background-lifecycle.test.ts ✅ Passed 185ms
tests/responses-body-method-errors.test.ts ✅ Passed 370ms
tests/responses-cancel-timeout.test.ts ✅ Passed 241ms
tests/responses-cancel.test.ts ✅ Passed 214ms
tests/responses-compact-retries.test.ts ✅ Passed 258ms
tests/responses-compact.test.ts ✅ Passed 209ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 159ms
tests/responses-create-advanced.test.ts ✅ Passed 234ms
tests/responses-create-disconnect.test.ts ✅ Passed 144ms
tests/responses-create-errors.test.ts ✅ Passed 230ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 143ms
tests/responses-create-retries.test.ts ✅ Passed 310ms
tests/responses-create-stream-failures.test.ts ✅ Passed 145ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 229ms
tests/responses-create-stream-wire.test.ts ✅ Passed 1.928s
tests/responses-create-stream.test.ts ✅ Passed 141ms
tests/responses-create-terminal-states.test.ts ✅ Passed 252ms
tests/responses-create-timeout.test.ts ✅ Passed 277ms
tests/responses-create.test.ts ✅ Passed 265ms
tests/responses-delete.test.ts ✅ Passed 234ms
tests/responses-input-items-errors.test.ts ✅ Passed 176ms
tests/responses-input-items-list.test.ts ✅ Passed 164ms
tests/responses-input-items-options.test.ts ✅ Passed 225ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 261ms
tests/responses-input-tokens-count.test.ts ✅ Passed 213ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.17s
tests/responses-not-found-errors.test.ts ✅ Passed 345ms
tests/responses-parse.test.ts ✅ Passed 187ms
tests/responses-retrieve-retries.test.ts ✅ Passed 240ms
tests/responses-retrieve.test.ts ✅ Passed 242ms
tests/responses-stored-method-errors.test.ts ✅ Passed 683ms
tests/retry-behavior.test.ts ✅ Passed 2.002s
tests/sdk-error-shape.test.ts ✅ Passed 385ms

View OkTest run #31423845264

SDK merge (9bc5a1c07120) · head (23b257c83489) · base (1c71a1eccdee) · OkTest (91635c6a2723)

@jbeckwith-oai jbeckwith-oai added the generator Touches generated SDK files label Aug 10, 2026

@HAYDEN-OAI HAYDEN-OAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the Azure v1 provider, including endpoint normalization, auth precedence, retry-time token refresh, redirect credential safety, and public types/docs. No substantive issues found.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit c1d223e Aug 10, 2026
14 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/azure-openai-v1 branch August 10, 2026 21:06
@openai-sdks openai-sdks Bot mentioned this pull request Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

generator Touches generated SDK files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants